﻿using System;
using System.Collections.Generic;
using System.Text;
using Antu.WebControls;
using System.Web;
using EluZSProvider;
using Antu.Core.Services;

namespace WebSys.UI.Control.ZhengShou
{
    public class DaohangPageControl : MPBasicTemplate
    {
        EluZSDataProvider _EluZSDataProvider = (EluZSDataProvider)ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
        public string userid = string.Empty;
        protected override void OnLoad(EventArgs e)
        {
            if (HttpContext.Current.Session["UserID"] == null)
            {
                //Antu.Utilities.UtilitiesPage.AlertDialogClear("登录超时，请重新登录！", "window.parent.location.href('../login.aspx');");
            }
            else
            {
                userid = HttpContext.Current.Session["UserID"].ToString();
            }
            base.OnLoad(e);
            if (!string.IsNullOrEmpty(userid))
            {
                if (!_EluZSDataProvider.IsNetZSAdmin(userid) && !_EluZSDataProvider.IsZSAdmin(userid))
                {
                    Antu.Utilities.UtilitiesPage.RegJsScript("dydiv()");
                }
            }
            else {
                Antu.Utilities.UtilitiesPage.RegJsScript("dydiv()");
            }
        }
    }
}
